Manages the keyboard devices available in the component. More...
Public Member Functions | |
| KeyboardDevice * | createOrRetrieve (const std::string_view &name) |
| KeyboardDevice * | get (const std::string_view &name) |
| void | rename (const std::string_view ¤tName, const std::string_view &newName) |
| void | erase (const std::string_view &name) |
Manages the keyboard devices available in the component.
At all times, manager owns any memory allocated inside. External code should never delete memory returned by it.
| KeyboardDevice* nkInputs::KeyboardDeviceManager::createOrRetrieve | ( | const std::string_view & | name | ) |
Creates if unavailable, or retrieves if available, a keybaord device.
| name | The name of the device to retrieve. |
| KeyboardDevice* nkInputs::KeyboardDeviceManager::get | ( | const std::string_view & | name | ) |
Retrieves a keyboard device.
| name | The name of the device to retrieve. |
| void nkInputs::KeyboardDeviceManager::rename | ( | const std::string_view & | currentName, |
| const std::string_view & | newName | ||
| ) |
Renames a keyboard device.
| currentName | The name of the device to rename. |
| newName | The name to reassign to the device. |
| void nkInputs::KeyboardDeviceManager::erase | ( | const std::string_view & | name | ) |
Erases and frees a keyboard device.
| name | The name of the device to erase. |